

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=&#34;auto&#34;>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/2.jpg">
  <link rel="icon" type="image/png" href="/img/2.jpg">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="">
  <meta name="author" content="K">
  <meta name="keywords" content="">
  <title>docker-环境安装-基础命令 - K</title>

  <link  rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.staticfile.org/github-markdown-css/4.0.0/github-markdown.min.css" />
  <link  rel="stylesheet" href="/lib/hint/hint.min.css" />

  
    
    
      
      <link  rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/10.0.0/styles/github-gist.min.css" />
    
  

  


<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_kmeydafke9r.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 5.2.0"></head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/">&nbsp;<strong>かい</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" data-toggle="modal" data-target="#modalSearch">&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;</a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" href="javascript:">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner intro-2" id="background" parallax=true
         style="background: url('/img/1.jpg') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="container page-header text-center fade-in-up">
            <span class="h2" id="subtitle">
              
            </span>

            
              <div class="mt-3">
  
  
    <span class="post-meta">
      <i class="iconfont icon-date-fill" aria-hidden="true"></i>
      <time datetime="2020-11-30 14:00" pubdate>
        2020年11月30日 下午
      </time>
    </span>
  
</div>

<div class="mt-1">
  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      1.4k 字
    </span>
  

  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      17
       分钟
    </span>
  

  
  
</div>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid">
  <div class="row">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-md">
      <div class="container nopadding-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto" id="post">
            <!-- SEO header -->
            <h1 style="display: none">docker-环境安装-基础命令</h1>
            
            <div class="markdown-body" id="post-body">
              <h2 id="Docker概述"><a href="#Docker概述" class="headerlink" title="Docker概述"></a>Docker概述</h2><ul>
<li>docker是一种linux容器技术，一种高效，敏捷和轻量级的容器解决方案</li>
<li>支持多种主流平台，和本地部署，docker是基于GO语言实现的开源项目，</li>
<li>遵循 apache2.0开源会议，全部源码均在 <a target="_blank" rel="noopener" href="https://github.com/docker">https://github.com/docker</a> 上进行相关维护。</li>
</ul>
<h2 id="Docker的体系结构"><a href="#Docker的体系结构" class="headerlink" title="Docker的体系结构"></a>Docker的体系结构</h2><ul>
<li>使用C/S架构</li>
</ul>
<h2 id="Docker内部核心概念"><a href="#Docker内部核心概念" class="headerlink" title="Docker内部核心概念"></a>Docker内部核心概念</h2><ul>
<li>镜像 docker images<ul>
<li>镜像是docker容器运行时的只读模板，镜像可以用来创建docker容器</li>
<li>镜像是只读的，容器在启动的时候，创建一层可写作最上层</li>
</ul>
</li>
<li>仓库 docker repository <ul>
<li>类似于代码仓库 它是docker集中存放镜像文件的地方</li>
</ul>
</li>
<li>容器 docker contains 利用容器运行 一个docker容器包含了所有的某个应用运行所需要的环境</li>
</ul>
<h2 id="Docker特性"><a href="#Docker特性" class="headerlink" title="Docker特性"></a>Docker特性</h2><ul>
<li>文件系统的隔离：每个进程容器运行在一个完全独立的根文件系统里</li>
<li>资源隔离：系统资源像 C 和内存等可以分配到不同的容器中，使用 Cegrop对系统资源进行分配隔离</li>
<li>网络隔离：每个进程容器运行在自己的网络空间，虚拟接口和ip地址</li>
<li>日志记录 Docker将会收集和记录每个进程容器的标准流</li>
<li>变更管理：容器文件系统可以提交到新的映像中，并可以重复使用以创建更多的容器，不需要使用模板或手动配置</li>
<li>交互式shell Docker 可以分配一个虚拟终端并关联到任何容器的标准输入上</li>
</ul>
<h2 id="Docker环境的安装"><a href="#Docker环境的安装" class="headerlink" title="Docker环境的安装"></a>Docker环境的安装</h2><table>
<thead>
<tr>
<th>系统</th>
<th>centos7.4以上</th>
</tr>
</thead>
<tbody><tr>
<td>阿里云地址</td>
<td><a target="_blank" rel="noopener" href="https://mirrors.aliyun.com/docker-ce/">https://mirrors.aliyun.com/docker-ce/</a></td>
</tr>
<tr>
<td>官网</td>
<td><a target="_blank" rel="noopener" href="https://docs.docker.com/">https://docs.docker.com/</a></td>
</tr>
<tr>
<td>docker镜像地址</td>
<td><a target="_blank" rel="noopener" href="https://hub.docker.com/">https://hub.docker.com/</a></td>
</tr>
</tbody></table>
<ul>
<li>配置yum源 </li>
<li>yum源 是从阿里云镜像地址找出<pre><code class="hljs awk">vim <span class="hljs-regexp">/etc/yum</span>.repos.d/ ali-docker.repo
[docker]
name = aliyun-docker
baseurl = https:<span class="hljs-regexp">//mi</span>rrors.aliyun.com<span class="hljs-regexp">/docker-ce/</span>linux<span class="hljs-regexp">/centos/</span><span class="hljs-number">7</span><span class="hljs-regexp">/x86_64/</span>stable/ 
enabled = <span class="hljs-number">1</span>
gpgcheck = <span class="hljs-number">1</span>
gpgkey = https:<span class="hljs-regexp">//mi</span>rrors.aliyun.com<span class="hljs-regexp">/docker-ce/</span>linux<span class="hljs-regexp">/centos/g</span>pg

https:<span class="hljs-regexp">//mi</span>rrors.aliyun.com<span class="hljs-regexp">/docker-ce/</span>linux<span class="hljs-regexp">/centos/</span><span class="hljs-number">7</span><span class="hljs-regexp">/x86_64/</span>stable/ <span class="hljs-comment"># 阿里的docker所有软件包</span>
https:<span class="hljs-regexp">//mi</span>rrors.aliyun.com<span class="hljs-regexp">/docker-ce/</span>linux<span class="hljs-regexp">/centos/g</span>pg <span class="hljs-comment"># 秘钥</span>
</code></pre></li>
<li>安装docker<pre><code class="hljs sql">yum <span class="hljs-keyword">install</span> -y yum-utils device-mapper-persistent-<span class="hljs-keyword">data</span> lvm2 <span class="hljs-comment"># 安装依赖</span>
yum -y <span class="hljs-keyword">install</span> docker-ce <span class="hljs-comment"># yum安装 </span>
systemctl <span class="hljs-keyword">start</span> docker <span class="hljs-comment"># 启动 </span>

docker -<span class="hljs-keyword">version</span> <span class="hljs-comment"># 查看docker当前版本</span>
docker <span class="hljs-keyword">version</span> <span class="hljs-comment"># 查看docker详细的版本信息等</span></code></pre>

</li>
</ul>
<h2 id="镜像加速"><a href="#镜像加速" class="headerlink" title="镜像加速"></a>镜像加速</h2><ul>
<li><p>一种 阿里云加速  <a target="_blank" rel="noopener" href="https://cr.console.aliyun.com/cn-qingdao/instances/mirrors">https://cr.console.aliyun.com/cn-qingdao/instances/mirrors</a> 镜像加速地址</p>
</li>
<li><p>一种 道客加速 <a target="_blank" rel="noopener" href="https://www.daocloud.io/">https://www.daocloud.io/</a> 镜像加速地址</p>
<ul>
<li><p>道云加速</p>
<pre><code class="hljs awk">curl -sSL https:<span class="hljs-regexp">//g</span>et.daocloud.io<span class="hljs-regexp">/daotools/</span>set_mirror.sh | sh -s http:<span class="hljs-regexp">//</span>f1361db2.m.daocloud.io <span class="hljs-comment"># 直接复制到linux运行</span>

systemctl restart docker <span class="hljs-comment"># 重启docker</span>

docker info 查看信息 在这里可以查看加速器是否更换</code></pre></li>
<li><p>以下是加速成功截图<br><img src="/images/docker/do_ke_jiasu.png" srcset="/img/loading.gif"></p>
</li>
<li><p>阿里云加速</p>
<pre><code class="hljs awk">vim <span class="hljs-regexp">/etc/</span>sysctl.conf
net.bridge.bridge-nf-call-iptables = <span class="hljs-number">1</span>
net.bridge.bridge-nf-call-ip6tables = <span class="hljs-number">1</span>
<span class="hljs-comment"># 添加这两个,docker info 时error就会没有（可以不用写，如果有error就写上）</span>

 vim <span class="hljs-regexp">/etc/</span>docker/daemon.json
 &#123;
  <span class="hljs-string">&quot;registry-mirrors&quot;</span>: [<span class="hljs-string">&quot;https://p5ihdfyr.mirror.aliyuncs.com&quot;</span>]
 &#125;
 <span class="hljs-comment"># 将里面的地址换成阿里云的镜像地址</span>

 systemctl daemon-reload
 systemctl restart docker <span class="hljs-comment"># 重启docker</span>
 docker info <span class="hljs-comment"># 查看</span></code></pre>
<p><img src="/images/docker/aliyun_jiasu.png" srcset="/img/loading.gif"></p>
</li>
<li><p>注意，道云现在一般不用这个了，用阿里云加速就可以</p>
</li>
</ul>
</li>
</ul>
<h2 id="docker基础命令"><a href="#docker基础命令" class="headerlink" title="docker基础命令"></a>docker基础命令</h2><ul>
<li><p>搜索镜像<br><code>docker search 镜像名</code><br><img src="/images/docker/%E5%91%BD%E4%BB%A41.png" srcset="/img/loading.gif"></p>
</li>
<li><p>列举自制镜像的起名方式</p>
<ul>
<li>lmk/centos-nginx-apache-ip</li>
<li>作者/镜像-镜像中安装的软件-软件-软件</li>
</ul>
</li>
<li><p>下载镜像<br><code>docker pull 镜像名</code><br><img src="/images/docker/%E5%91%BD%E4%BB%A42.png" srcset="/img/loading.gif"></p>
</li>
<li><p>查看镜像<br><code>docker images</code><br><img src="/images/docker/%E5%91%BD%E4%BB%A43.png" srcset="/img/loading.gif"></p>
</li>
<li><p>删除镜像<br><code>docker rmi 镜像id\镜像名</code><br><img src="/images/docker/%E5%91%BD%E4%BB%A44.png" srcset="/img/loading.gif"></p>
</li>
<li><p>导出镜像<br><code>docker save -o 导出镜像名.tar 要导出的镜像 </code><br><img src="/images/docker/%E5%91%BD%E4%BB%A45.png" srcset="/img/loading.gif"> </p>
</li>
<li><p>导入镜像<br><code>docker load &lt; 镜像tar包</code><br><img src="/images/docker/%E5%91%BD%E4%BB%A46.png" srcset="/img/loading.gif"> </p>
</li>
<li><p>上传镜像<br><code>docker push 镜像名称</code></p>
</li>
<li><p>这里需要连接谷歌，图片暂时没有</p>
</li>
<li><p>查看docker基础信息<br><code>docker info</code><br><img src="/images/docker/%E5%91%BD%E4%BB%A47.png" srcset="/img/loading.gif"> </p>
</li>
<li><p>查看正在运行的容器<br><code>docker ps </code><br><code>docker ps -a 查看所有运行过的容器</code><br><img src="/images/docker/%E5%91%BD%E4%BB%A48.png" srcset="/img/loading.gif"> </p>
</li>
<li><p>运行容器内的命令<br><code>docker run centos 需要运行的命令</code><br><img src="/images/docker/%E5%91%BD%E4%BB%A49.png" srcset="/img/loading.gif"> </p>
</li>
<li><p>从后台运行容器<br><code>docker run -itd 容器名称 /bin/bash</code></p>
</li>
<li><p>it 打开交互页面</p>
</li>
<li><p>d 后台运行</p>
</li>
<li><p>后台运行后会显示一个长的容器编号，容器的id编号就是长容器编号的前12位<br><img src="/images/docker/%E5%91%BD%E4%BB%A410.png" srcset="/img/loading.gif"> </p>
</li>
<li><p>启动容器\关闭容器</p>
<pre><code class="hljs properties"><span class="hljs-attr">docker</span> <span class="hljs-string">start 容器名</span>
<span class="hljs-attr">docker</span> <span class="hljs-string">stop 容器名</span>
<span class="hljs-attr">docker</span> <span class="hljs-string">restart 容器名          重启容器</span>
<span class="hljs-attr">docker</span> <span class="hljs-string">kill 容器名             快速关闭容器 </span></code></pre></li>
<li><p>挂起容器</p>
<pre><code class="hljs properties"><span class="hljs-attr">docker</span> <span class="hljs-string">pause 容器名           挂起</span>
<span class="hljs-attr">docker</span> <span class="hljs-string">unpause 容器名         取消挂起</span></code></pre>
</li>
<li><p>进入容器<br><code>docekr attach 容器名</code><br><img src="/images/docker/%E5%91%BD%E4%BB%A411.png" srcset="/img/loading.gif"><br><code>docker exec -it 容器名</code><br><img src="/images/docker/%E5%91%BD%E4%BB%A412.png" srcset="/img/loading.gif">   </p>
</li>
<li><p>两者的区别</p>
<ul>
<li>Bash是可以多开的</li>
<li>attach代表的是进入容器已经打开的bash</li>
<li>exec 代表是重新打开一个bash </li>
<li>exec本身的作用是让计算机去执行某一个命令</li>
<li>attach是真正的进入容器</li>
<li>docker exec -it 容器id /bin/bash     这个就是让exec去容器内在执行一个bash，从而让容器完成运行</li>
</ul>
</li>
<li><p>删除容器</p>
<pre><code class="hljs powershell">docker <span class="hljs-built_in">rm</span> 容器名        
docker <span class="hljs-built_in">rm</span> <span class="hljs-operator">-f</span> 容器名          强制删除容器</code></pre></li>
<li><p>给容器命名</p>
<pre><code class="hljs applescript">docker <span class="hljs-built_in">run</span> -itd <span class="hljs-comment">--name 容器名 容器镜像</span></code></pre></li>
<li><p>将容器制作成镜像<br><code>docker commit 容器id\容器名  要启动的容器名 （lmk/centos-nginx）</code></p>
</li>
</ul>
<h2 id="小结"><a href="#小结" class="headerlink" title="小结"></a>小结</h2><ul>
<li>docker两个进入容器方法的区别<blockquote>
<p>attach 和 exec<br>attach 是直接进入docker的bash环境<br>exec 是先创建一个bash环境，然后再进入，退出是退出的刚刚创建的bash环境</p>
</blockquote>
</li>
<li>docker的基础操作逻辑</li>
</ul>
<p><img src="/images/docker/luoji.png" srcset="/img/loading.gif"> </p>
<blockquote>
<p>docker 先pull将仓库中的镜像下载到本地，然后通过images查看到镜像，通过run 将镜像运行在容器中，然后可以对容器进行操作（start，stop 等），也可以对容器安装软件，安装完服务或者软件后，通过commit对容器进行打包成镜像，然后通过save将镜像保存到本地，在其他docker中load到其他docker中，或者push上传到docker仓库</p>
</blockquote>

            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                  <div class="post-meta mr-3">
                    <i class="iconfont icon-category"></i>
                    
                      <a class="hover-with-bg" href="/categories/docker/">docker</a>
                    
                  </div>
                
                
                  <div class="post-meta">
                    <i class="iconfont icon-tags"></i>
                    
                      <a class="hover-with-bg" href="/tags/docker/">docker</a>
                    
                  </div>
                
              </div>
              
                <p class="note note-warning">本博客所有文章是以学习为目的，如果有不对的地方可以一起交流沟通共同学习 邮箱:1248287831@qq.com！</p>
              
              
                <div class="post-prevnext row">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2020/12/01/docker%E6%A0%B8%E5%BF%83%E5%8E%9F%E7%90%86/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">docker核心原理</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2020/11/15/%E5%89%8D%E7%AB%AF%E5%B8%83%E5%B1%80-rem%E5%B8%83%E5%B1%80/">
                        <span class="hidden-mobile">前端布局-rem布局</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div id="tocbot"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    
  </main>

  
    <a id="scroll-top-button" href="#" role="button">
      <i class="iconfont icon-arrowup" aria-hidden="true"></i>
    </a>
  

  
    <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
  

  

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
     <a href="https://space.bilibili.com/39165374" target="_blank" rel="nofollow noopener"><span>LMK</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
  </div>
  
  <div class="statistics">
    
    

    
      
        <!-- 不蒜子统计PV -->
        <span id="busuanzi_container_site_pv" style="display: none">
            总访问量 
            <span id="busuanzi_value_site_pv"></span>
             次
          </span>
      
      
        <!-- 不蒜子统计UV -->
        <span id="busuanzi_container_site_uv" style="display: none">
            总访客数 
            <span id="busuanzi_value_site_uv"></span>
             人
          </span>
      
    
  </div>


  

  
</footer>

<!-- SCRIPTS -->
<script  src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js" ></script>
<script  src="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/js/bootstrap.min.js" ></script>
<script  src="/js/debouncer.js" ></script>
<script  src="/js/main.js" ></script>

<!-- Plugins -->


  
    <script  src="/js/lazyload.js" ></script>
  



  



  <script defer src="https://cdn.staticfile.org/clipboard.js/2.0.6/clipboard.min.js" ></script>
  <script  src="/js/clipboard-use.js" ></script>



  <script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>





  <script  src="https://cdn.staticfile.org/tocbot/4.11.1/tocbot.min.js" ></script>
  <script>
    $(document).ready(function () {
      var boardCtn = $('#board-ctn');
      var boardTop = boardCtn.offset().top;

      tocbot.init({
        tocSelector: '#tocbot',
        contentSelector: '#post-body',
        headingSelector: 'h1,h2,h3,h4,h5,h6',
        linkClass: 'tocbot-link',
        activeLinkClass: 'tocbot-active-link',
        listClass: 'tocbot-list',
        isCollapsedClass: 'tocbot-is-collapsed',
        collapsibleClass: 'tocbot-is-collapsible',
        collapseDepth: 0,
        scrollSmooth: true,
        headingsOffset: -boardTop
      });
      if ($('.toc-list-item').length > 0) {
        $('#toc').css('visibility', 'visible');
      }
    });
  </script>



  <script  src="https://cdn.staticfile.org/typed.js/2.0.11/typed.min.js" ></script>
  <script>
    var typed = new Typed('#subtitle', {
      strings: [
        '  ',
        "docker-环境安装-基础命令&nbsp;",
      ],
      cursorChar: "_",
      typeSpeed: 70,
      loop: false,
    });
    typed.stop();
    $(document).ready(function () {
      $(".typed-cursor").addClass("h2");
      typed.start();
    });
  </script>



  <script  src="https://cdn.staticfile.org/anchor-js/4.2.2/anchor.min.js" ></script>
  <script>
    anchors.options = {
      placement: "right",
      visible: "hover",
      
    };
    var el = "h1,h2,h3,h4,h5,h6".split(",");
    var res = [];
    for (item of el) {
      res.push(".markdown-body > " + item)
    }
    anchors.add(res.join(", "))
  </script>



  <script  src="/js/local-search.js" ></script>
  <script>
    var path = "/local-search.xml";
    var inputArea = document.querySelector("#local-search-input");
    inputArea.onclick = function () {
      searchFunc(path, 'local-search-input', 'local-search-result');
      this.onclick = null
    }
  </script>



  <script  src="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.css" />

  <script>
    $('#post img:not(.no-zoom img, img[no-zoom]), img[zoom]').each(
      function () {
        var element = document.createElement('a');
        $(element).attr('data-fancybox', 'images');
        $(element).attr('href', $(this).attr('src'));
        $(this).wrap(element);
      }
    );
  </script>















</body>
</html>
